<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>RG PORTAL</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="<c:url value='/resources/css/bootstrap.css'/>" />
    <link rel="stylesheet" type="text/css" href="<c:url value='/resources/css/bootstrap-responsive.css'/>" />
    <script src="<c:url value='/resources/js/jquery.js'/>" > </script>
    <script src="<c:url value='/resources/js/bootstrap.js'/>" > </script>
     <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <body>

    <%@ include file="/WEB-INF/views/admin/menu.jsp" %>
    
    <div class="container">

      <div class="hero-unit">
        <center><h3>Edição de Usuário</h3></center>
        <hr style="border-color:#000;">
        <br>
        <c:url value='/admin/usuarios/alterar' var="url"/>
        <form:form class="form-horizontal" action="${url}" method="post"  commandName="usuario">
		  
		  <%@ include file="/WEB-INF/views/admin/usuarios/cadastroUsuario.jsp"%>
		  
		  <button class="btn btn-primary" type="submit">Salvar</button>
		</form:form>
		
      </div>
      
        <!-- Modal Nova Permissão -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Nova Permissão</h3>
  </div>
  	<c:url value='/admin/salvarPermissao' var="url"/>
	<form:form action="${url}" method="post" commandName="permissao">
	<form:input path="id" type="hidden"/>
	  <div class="modal-body">
	  	<label class="control-label" for="nomePermissao">Nome</label>
		<div class="controls">		     
	    	<form:input type="text" id="nomePermissao" path="nome" placeholder="Ex.: ROLE_ADMIN" />
	    </div>
	  </div>
	  <div class="modal-body">
	  	<label class="control-label" for="grupoPermissao">Grupo</label>
		<div class="controls">		     
	    	<form:input type="text" id="grupoPermissao" path="grupo" placeholder="Ex.: Administrador" />
	    </div>
	  </div>
	  <div class="modal-body">
	  	<label class="control-label" for="textareaPermissao">Descrição</label>
		<div class="controls">		     
	    	<form:textarea rows="3" id="textareaPermissao" path="descricao" placeholder="EX.: Permissão para os usuários do departamente administrativo"></form:textarea>
	    </div>
	  </div>
	  <div class="modal-footer">
	    <button class="btn" data-dismiss="modal" aria-hidden="true">Cancelar</button>
	    <button class="btn btn-primary" type="submit">Salvar</button>
	  </div>
	</form:form>
</div>
        

     <%@ include file="/WEB-INF/views/admin/rodape.jsp" %>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>
